package com.bigcat.gulimall.demo.test;

import java.math.BigDecimal;
import java.text.DecimalFormat;

/**
 * @author sufer_yuan
 * @since 2022/10/11
 */
public class test4 {
    public static void main(String[] args) {
        int i = 3;
        double d = i;
        System.out.println(d);

        Double aDouble = (double) i;

        System.out.println(aDouble);

        DecimalFormat decimalFormat = new DecimalFormat("0.00");
        String format = decimalFormat.format(aDouble);
        System.out.println(format);

        BigDecimal bigDecimal = new BigDecimal(i);

        BigDecimal add = bigDecimal.add(bigDecimal);
        System.out.println(add);

        long a = 1000001;

        DecimalFormat format1 = new DecimalFormat("0.00");
        double d1 = a/100d ;

    }
}
